lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Parallel programming.md (799B)


      1 +++
      2 title = 'Parallel programming'
      3 +++
      4 # Parallel programming
      5 ## Thread creation
      6 how do we make processors participate in parallel execution?
      7 
      8 when a single processor runs a program, there is one active thread of execution control
      9 
     10 for a parallel program, you need independent tasks handled separately by multiple threads of execution control (one for each processor)
     11 
     12 these threads are created explicitly, e.g. using a create_thread routine in a parallel programming library
     13 
     14 ## Thread synchronisation
     15 
     16 how do we ensure that each processor finishes its task before the final result is computed?
     17 
     18 several methods, usually implemented in library routines
     19 
     20 e.g. barrier — force threads to wait until they all have reached a specific point in the program where there is a call to the barrier routine